<?php
// use Magnum_handlers_get...
Magnum::importcore('handlers/get');
/**
 * self defined:
 * the get event handler!
 * use simple functions to solve big problems!
 * @uses Magnum_Handlers_Get
 */
class Extend_Handlers_Get extends Magnum_Handlers_Get
{
    public function hello($params)
    {
        $this->_view->addSrc('body', 'I am getting these inputs:<pre>' . print_r($params, 1) . '</pre>');
        $this->_view->addTemplate('body', 'index.php');

    }// end hello_world


    /**
     * index event
     */
    public function index($params)
    {
        // test scripts and shit...
        // give it a title!
        $this->_view->getHeader()->setTitle('index page!');
        // some style?
        $this->_view->getHeader()->setCss('index.css', 'projector');
        $this->_view->getHeader()->appendCss('site.css', 'screen');
        $this->_view->getHeader()->prependCss('body{font-weight:bold;}', 'screen');
        $this->_view->getHeader()->appendCss('sites.css', 'print');

        // meta
        $this->_view->getHeader()->setMeta('hello', 'world');

        // js
        $this->_view->getHeader()->appendJs('document.write("hello world");');

        // still, render the index page...
        $this->_view->addTemplate('body', 'index.php');

        // set a new var: test to render
        $this->_view->addSrc('test', 'hey i m a test');

    }// end index

}// end Magnum_Handlers_Get
?>